<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <base th:href="${#servletContext.getContextPath()+'/'}">
    <link rel="stylesheet" type="text/css" href="bootstrap-3.4.1/dist/css/bootstrap.css">
    <script type="text/javascript" src="jquery/jquery-3.6.1.min.js"></script>
    <script type="text/javascript" src="jquery/http.js"></script>

    <script type="text/javascript">
        function deleteUser(id) {
            console.log("异步");
        }
    </script>

</head>
<body>
<a href="/PageServlet/system/User/UserAdd.html">添加</a>
<table class="table">
    <tr>
        <th>id</th>
        <th>username</th>
        <th>sex</th>
        <th>email</th>
        <th>birthday</th>
        <th>操作</th>
    </tr>
    <tr th:each="sysUser:${UserList}">
        <td th:text="${sysUser.id}"/>
        <td th:text="${sysUser.username}"/>
        <td th:text="${sysUser.sex == 1?'男':'女'}"/>
        <td th:text="${sysUser.email}"/>
        <td th:text="${#dates.format(sysUser.birthday,'yyyy-MM-dd')}"/>
       <td>
           <a th:href="|UserServlet/userById?id=${sysUser.id}|">编辑</a>
           <a href="javascript:alert()" th:onclick="|deleteUser(${sysUser.id})|">删除</a>
       </td>
    </tr>

</table>
</body>
</html>